Diagnostic procedure and device for a field bus system

ABSTRACT

The invention relates to a computer-implemented diagnostic procedure for a field bus system in which bus users exchange data via a field bus in accordance with a predetermined communication protocol, the data being exchanged in the form of data packets, comprising the following procedural steps: (a) recording states of the bus users; (b) detecting a data packet which is transmitted via the field bus between the bus users; (c) analyzing the data packet and deriving an updated state of the bus users in dependence on the preceding state of the bus users and the content of the data packet; (d) recording the updated states of the bus users; (e) repeating steps (b) to (d) in order to detect the current states of the bus users in an in-line manner.

FIELD OF THE INVENTION

The invention relates to a computer-implemented diagnostic procedure anda diagnostic facility for a field bus system in which one or morecontrollers and a number of field devices exchange data via a field busin accordance with a predetermined communication protocol.

BACKGROUND OF THE INVENTION

Field bus systems are digital communication systems widely used inindustry, which connect a multiplicity of field devices such as sensors,actuators and drives, input and output assemblies, controllers,operating devices and displays and other components of automationtechnology with one another. At present, different field bus systemshaving different characteristics are established on the market, e.g.PROFIBUS, INTERBUS, Control Net, FOUNDATION field bus, CAN or LON. Inrecent years, Ethernet-based communication systems with an extension forreal time, which have the potential of replacing the previously knownfield bus systems in the future, have been increasingly becomingestablished in the industrial domain. In the context of the presentinvention, the term field bus thus designates such local networks whichare suitable for industrial applications for connecting field devicesand controllers.

FIG. 1 schematically shows an example of such a field bus system inwhich a central controller 10 is connected to a multiplicity of fielddevices 12, 14, 16, 18 via a field bus line 20. The invention can alsobe applied to systems having a number of controllers.

A field bus system operates on the basis of a protocol stack which isbuilt up of three to seven protocol layers building upon one another,including a physical layer, a data link layer and an application layer.The data transmission between the field devices occurs on the physicallayer and the data link layer. The physical layer specifies how signalsare sent, the field bus data link layer specifies how the network isjointly used and the individual devices obtain access to the network,and the application layer defines the application-specific services anddata formats.

In field bus systems, digitally coded data are transmitted in discretesegments which are generally called data packets or messages. The numberof users sharing a field bus medium is variable and, as a rule, isbetween 2 and 32 field devices, wherein logical link-ups of a number offield bus segments can also have three digit user numbers.

The data packets are transmitted on the field bus between the fielddevices and the controller. Each data packet can contain informationwith respect to the data link layer and information with respect to theapplication layer or with respect to other layers depending on thearchitecture of the system.

In a field bus system, errors can occur in different layers, startingwith physical errors such as invalid signal levels, invalid signal formsand electromagnetic interference, via errors in the data link layer suchas protocol violations up to errors in the application layer such aswrong configuration of the communication relations between the bususers. If the errors remain undetected, this can lead to the loss ofcritical information and to faulty operation of the field devicescontrolled by the field bus system. Errors can also impair the field bussystem itself. To detect, analyze and eliminate such errors, the datatraffic on the field bus is observed, therefore.

For functional checking and for fault finding in field bus systems,protocol analyzers such as message analyzers and bus monitors are usedin the prior art. Such programs, which, as a rule, are PC-based, areconnected to the field bus system to be examined via a bus interfacesuch as an Ethernet port or a PROFIBUS interface. In the prior art, itis also known to connect to the field bus system independent testingdevices in which the bus interface, a display and the test software areintegrated in one device.

Protocol analyzers act passively, i.e. they observe the data traffic onthe field bus but do not transmit themselves and record the data packets(messages) transmitted on the field bus. Although earlier versions ofprotocol analyzers were already capable of acquiring data in real time,the possibilities of analysis were limited. The data packets wereacquired and stored initially and analyzed at a later time. Storageusually comprises the representation of the data packets in symbolicform in various protocol layers or levels of abstraction. Furthermore,the transmitting time of each data packet is logged by an associatedtime stamp. During the recording of the data packets, filter and triggerfunctions enable the volume of data to be reduced. Simple statisticalevaluations, e.g. the indication of the addresses of the stations activeon the bus (Live List) or the indication of error counters are alsopossible in the systems of the prior art.

From U.S. Pat. No. 5,442,639 and U.S. Pat. No. 5,796,721, protocolanalyzers are also already known which are capable of analyzing thefield bus traffic in real time. These systems, too, operate on the basisof filters, U.S. Pat. No. 5,796,721 describing a bus monitor which canallow the data packets from a field bus to pass through a number offilters. The filtered packets can be represented in real time. Accordingto this document, the filter parameters can be varied in operation.

FIG. 2 shows by way of example the representation of the message trafficin a protocol analyzer of the prior art without any filtering. From leftto right, a message number, a time stamp, source and destination addressand message type or communication service are displayed. Clicking twiceon a message causes it to be displayed in detail and to be decoded. Thevolume of data can be reduced by applying filters, as mentioned above.

The protocol analyzers of the prior art have a number of disadvantageswhich are represented briefly in the text which follows:

-   -   In industrial applications, there is demand for shorter and        shorter response times which leads to ever increased        transmission rates and thus to ever larger volumes of data which        are transmitted on the field bus. A recording accurate to the        bit position thus leads to data volumes of many megabytes per        second which can only be handled with difficulty. For example, a        PROFIBUS system generates about 1 Mbyte of message data per        second at a transmission rate of 12 Mbit/sec.    -   Due to the large volumes of data, the bus traffic can only be        recorded section by section. As an alternative, it must be        filtered in advance in accordance with particular criteria. As a        result, data packets may, under certain circumstances, be        missing which are only transmitted at particular intervals such        as at the bus or device start-up or which are filtered out due        to preset filter criteria. However, such data packets can        contain essential information for the interpretation of the        field bus traffic.    -   In the known system, the user must interpret the messages. For        this purpose, he needs detailed knowledge about the        communication protocol of the field bus system which, as a rule,        is not available to the operator of a field bus system.    -   Data packets can frequently be interpreted correctly only in the        context of the states of the transmitting and receiving bus        user. However, this context is known neither to the protocol        analyzer nor to the user. This problem can be illustrated by        means of the example of a chess game performed via mail. The        significance of the chess move described in an arbitrarily        selected letter only becomes apparent to the person who knows        the state of the game. Thus, the situation on the chessboard        must be known for a reasonable interpretation. In the same        manner, a reasonable interpretation of the communication        protocol of the field bus system can only be carried out with        knowledge of the states of the connected users. This knowledge        is largely lacking in the known protocol analyzers.    -   As a rule, traditional bus monitors with message recording are        used only when an error has occurred and is to be analyzed. It        is frequently difficult then to reproduce the error. In        addition, correction of the bus monitor requires an intervention        in the system which is frequently rejected by the system        operator.

It is, therefore, an object of the invention to specify a diagnosticprocedure and a diagnostic facility for a field bus system which allowsa continuous and on-line state analysis of the data traffic of the fieldbus system.

SUMMARY OF THE INVENTION

The basic concept of the invention is an analysis procedure in which,instead of recording the data traffic of the field bus system, possiblywith filtering and subsequent off-line analysis of the stored datapackets, a continuous and in-line state analysis of the data traffic inthe field bus system is carried out. For this purpose, knowledge aboutthe states of the field devices and protocol knowledge is utilized whichexists in the protocol stacks used for the communication. In detail, thestates of the field devices are recorded, data packets which aretransmitted via the field bus between the controller and the fielddevices are detected and analyzed and an updated state of the fielddevices is derived in dependence on the preceding state of the fielddevice and the content of the data packet. The updated states of thefield devices are recorded, the detecting, analyzing and recording beingrepeated cyclically.

Thus, the invention does not record the data traffic in the field bussystem with bit-position accuracy for a later analysis but analyses itin-line. This means that even during the reception of a data packet, itscontent is analyzed and evaluated with respect to its informationcontent. From this, the information of interest to the user is derivedwhich can relate to the state of a field device, the state of the fieldbus and/or the state of the entire field bus system.

The diagnostic procedure described can preferably be implemented assoftware implementation in PC-based protocol analysis modules and indevices for bus monitoring, which are permanently installed in a fieldbus system.

The procedure according to the invention makes use of the fact thatcommunication protocols are frequently specified and implementedformally as state machines, so that the invention can also beimplemented as a state machine. A state machine, also called finitestate machine, is a model of the behavior consisting of states, statetransitions and actions. A state stores the information about the past,i.e. it reflects the changes in the input since system start-up to thecurrent time. A state transition indicates the change in the state of astate machine and is described by logical conditions. An action is theoutput of the state machine which occurs in a particular situation.Accordingly, a received data packet leads to a new internal state, andpossibly to an action, e.g. the sending of a response or the activationof a device function, in dependence on the internal state of thereceiver, e.g. the field device. In the procedure according to theinvention, this principle is also applied for the diagnosis of the fieldbus system wherein, in distinction from a normal bus user, i.e. thecontroller and field devices, the diagnostic component preferablydetects all data packets present on the bus and replicates the states ofall bus users. The diagnostic procedure according to the invention ispreferably implemented by software. In principle, this software thusbehaves like the receiver of a data packet and can replicate itsinternal states and reactions (actions). However, the diagnosticsoftware should do this separately for each user in the field bussystem, particularly for each field device, and in each case needs aninstantiation of the state data of the users of the field bus system forthis purpose.

According to the invention, the information obtained from the analysisof the data packets is thus matched against the last known state of thetransmitting and receiving device. From this, a new state pattern of thebus users affected is optionally derived. It is thus possible that thediagnostic procedure according to the invention always maintains acurrent pattern or image of the state of the bus users, i.e. of thefield devices, of the field bus and of the controller. This “pattern” or“image” is implemented, for example, by a state vector which reproducesthe field-bus-specific states or communication states of the bus users,i.e. particularly of the field devices and of the controller(s).

The detection and recording of the state information in the state vectorforms the context, which is not transmitted on the field bus, which isessential for the interpretation of the data packets. Furthermore, thestate vector represents the current state information of the field bussystem and thus the information which is actually of interest to a user.

In the preferred embodiment of the invention, the state vector isgenerated cyclically and contains the state information of the field busand of all bus users. In bus systems which operate cyclically such asthe PROFIBUS-DP, a new state vector is generated per bus cycle. In othercases, the cycle of state observation, detection and analysis can bepredetermined by a user.

The procedure of state detection and observation according to theinvention enables the information due to the packet traffic to becondensed and reduced to the information content which is actually ofinterest to the user. As a result, the data traffic in the field bussystem can be observed over long periods of time without a loss of dataoccurring.

The condensation of information is also a result of the fact that cyclicprotocols have a high redundancy of information. A particular processvalue is possibly transmitted thousands of times without changing. Eachcommunication protocol also contains a multitude of data packets whichcontrol the protocol but are not information-bearing in the sense of theapplication. Such data packets do not need to be recorded but can bestatistically evaluated and provide valuable information in the case ofa fault. According to the invention, it is provided, therefore, toanalyze the data packets with respect to message repetitions, errormessages and/or state changes of the bus users and to detect andstatistically evaluate the frequency of these message repetitions, errormessages or state changes. In particular, this allows a possibledeterioration of the field bus system to be detected early.

In principle, the diagnostic procedure according to the inventionoperates passively; thus it does not actively participate in the datatraffic on the field bus. In one embodiment of the invention, however,it can also be provided that information is actively queried by activelysending a data packet through the diagnostic system. This is appropriateif particular state information cannot be obtained by pure observationas in the case of data which are only transmitted during the start-up ofthe system, when this start-up could not be observed.

The diagnostic procedure and the diagnostic facility according to theinvention, respectively, can be integrated as fixed components of afield bus system so that it is not necessary to connect them only in thecase of a fault. In practice, connecting the diagnostic system in caseof a fault only, would frequently provide problems because it could berejected by the system operator because of a possible influence on thesystem.

The diagnostic procedure according to the invention can provide both acurrent pattern of the field bus system and detect and store a completeor partial history of the operation and can thus gain considerably moreinformation than is possible with a short-term message recording. Inthis context, it can be provided according to the invention to recordonly the current states or both the current states and their history.Furthermore, the message recordings can be stored in addition to thestate vectors if this appears to be necessary for a detailed analysis.

The invention allows error trends to be detected early due to long-termobservations. Error detection occurs particularly by means of analysisof the data packets with respect to message repetitions, error messagesand state changes of the bus users. This is based on the finding thateven physical faults which are produced, for example, due to corrosionof contacts, due to the gradual deterioration of the quality oftransmission initially only lead to individual faulty data packets whichdo not have a damaging effect due to protocol characteristics such asredundancy of information or message repetition but which can bedetected statistically by means of suitable diagnostic measures. Anexample of this is the counting of message repetitions, wherein anaccumulated occurrence of message repetitions within a particular timeinterval can indicate a deterioration in the transmission medium.

SHORT DESCRIPTION OF DRAWINGS

In the text which follows, the invention is explained in greater detailwith reference to the drawings, by means of preferred embodiments. Inthe figures:

FIG. 1 shows a schematic illustration of a field bus system according tothe prior art;

FIG. 2 shows a screen print-out for representing data packets which areevaluated in a traditional protocol analyzer;

FIG. 3 shows a flow chart for representing the procedure according tothe invention; and

FIG. 4 shows a screen print-out for representing the state informationin the diagnostic facility according to the invention.

DETAILED DESCRIPTION

The basic structure of the diagnostic procedure according to theinvention is shown in FIG. 3. In the procedure of the invention, initialstates of the field bus system are initially recorded, wherein, in apotential initial state, the entire field bus system is shut down, theconnected field devices are neither known nor configured and noconnection is set up. However, the diagnostic procedure according to theinvention can also be used during running operation of the field bussystem, wherein it can then actively query missing information about thestates of the bus users, if necessary. Examples of states of fielddevices and device-specific information which can be determined andupdated by the diagnostic system according to the invention are:

-   -   device address;    -   device type;    -   device starting up;    -   device running in steady-state mode;    -   device shutting down;    -   device failing;    -   device is wrongly parameterized or configured;    -   device transmitting operating state;    -   device transmitting alarm or error message;    -   input/output data of the device.

Examples of state information which relates to the field bus and itsconnection to the bus users are:

-   -   state of connection (set-up, cleared down);    -   connection characteristics, e.g. cyclic, acyclic, logical        channel number.

Examples of states which reproduce bus-specific information are:

-   -   bus parameters such as transmission rate, line length,        transmission methods, topology, priorities;    -   timing parameters such as cycle times, pause times;    -   error statistics such as message repetitions, faulty messages.

In the embodiment shown in FIG. 3, the diagnostic procedure according tothe invention is used as a bus analyzer. It is implemented as a programwhich, for example, runs on a portable PC and can be connected to thefield bus when necessary. For example, it is used by commissioning andservice personnel for checking field bus systems and for fault findingin field bus systems. As mentioned above, the initial states of the bususers are initially determined in the procedure. Then the data packetsare successively detected and analyzed for all bus users. Havingknowledge of the preceding state for the respective bus user and of theassociated data packet, the state can be updated for the respective bususer. The updated states are recorded. As a result, a simpleclassification of the states into categories such as “faultlessoperation”, “irregularities in operation” and “error occurred” isinitially possible. These states can be represented, for example, incolor in the form of a traffic light function, allocating the colorsgreen, yellow and red to the respective bus users. As a result, a userobtains a simple and illustrative overview of the operation of his fieldbus system without having to analyze any data packets. Using theprocedure according to the invention, a nominal-actual comparison isalso possible in which the expected ideal state of the field bus systemis compared with the real system state and deviations are indicated.Typical state information for this application is:

-   -   list of the field devices active on the field bus;    -   operating states of the field devices such as start-up,        shut-down, in operation, fault occurred, not configured or        wrongly configured;    -   input/output data of the field devices, edited        device-specifically if possible;    -   information relating to the field devices such as manufacturer,        type;    -   statistical information such as number of disturbed data        packets, number of restarts, number of the alarm message.

Not all of this information can be decoded from the data packets(messages) alone. For example, the input/output data of the fielddevices are transmitted as an unformatted byte sequence, the semanticsof the byte sequence being device specific. A semantically correctrepresentation is possible only if a description of the device structureis available. Such descriptions are defined for virtually all fieldbuses as “electronic device description”.

For the evaluation of the input/output data of the field devices, theinvention, in one embodiment, provides to issue for each device type anunambiguous type identification via which the associated electronicdevice description can be referenced. The diagnostic facility can thenobtain from this file the necessary knowledge for semantically correctrepresentation, e.g. of the input/output data or the alarm message.

This type of analysis of the data packets is illustrated in the exampleof a motor controller: particular bits of the input/output data signify,e.g. “on” or “off”, “clockwise” or “anticlockwise”; other bits indicatethat an alarm message is present. Within an alarm message, in turn,particular bits can signify “current limiting active” or “maximumoperating temperature exceeded”. The diagnostic facility can thusrepresent the state of a motor control device, instead of the binaryrepresentation “01100010”, in plain text “motor on, counterclockwise”.

FIG. 4 shows a screen print-out for representing the state informationin the diagnostic facility according to the invention. The tree of theleft-hand side of the figure shows a PROFIBUS segment, that is to saythe field bus system, in which there is a master (controller) which, inturn, has a number of associated slaves (field devices). Each component,i.e. the actual field bus, the controller and the field devices, has anassociated “traffic light”, wherein the system state can be seen at aglance due to the representation with traffic light colors. On theright-hand side of the representation, the state data of in each caseone component can be displayed in detail.

In a further embodiment of the invention, the diagnostic facility ismainly used for statistical long-term observation of the field bussystem. For this purpose, the diagnostic procedure according to theinvention is used in a diagnostic device permanently installed in thefield bus system and the changes of particular elements of the statevector are predominantly considered which can point to malfunctions.These elements are, for example:

-   -   changes in the number of active field devices which can point to        the failure of individual devices;    -   the occurrence, increase or decrease in message repetitions        which can point to a deterioration or improvement in the line or        signal quality;    -   a repeated occurrence of restart and/or reparameterization of        the field devices which can point to a sporadic device failure;    -   the occurrence and particularly the accumulation of alarm        messages.

In this embodiment of the diagnostic procedure according to theinvention, the state vector which reproduces the states of the bus usersis thus filtered for particular elements and statistically evaluated. Bymonitoring this state information, deterioration can be detected earlyand a system stoppage can be avoided by preventative maintenance. As aresult, production failures, in particular, can be avoided.

In a further embodiment of the invention, the diagnostic facility ispredominantly used for visualizing the process sequences and forevaluating the field bus system overall. As shown in FIG. 1, the fieldbus systems, as a rule, connect a central controller to field devicessuch as input/output assemblies, sensors, controllers and the like forprocess linkage. Communication occurs, for example, cyclically betweenthe controller and the other bus users. Without a diagnostic device, thetransmitted data could be accessed, for the purpose of visualization orlogging, only via the controller to which, however, it is not possibleto link arbitrary external systems. Therefore, the diagnostic procedureaccording to the invention can also be used for detecting data bypassive monitoring in order to represent them visually or to log them.

The diagnostic procedure according to the invention can also be used for“asset management” or “asset monitoring” in order to detect, evaluateand store system data and operating parameters at a central point. Inthis context, complete inventories of the bus users and an evaluation oftheir operability can be generated. This can be implemented by theprocedure according to the invention by merely “monitoring” the datatraffic on the field bus without the existing communication structurehaving to be changed.

1. Computer-implemented diagnostic procedure for a field bus system inwhich bus users exchange data via a field bus in accordance with apredetermined communication protocol, the data being exchanged in theform of data packets, comprising the following procedural steps: (a)recording operational states of the bus users; (b) detecting a datapacket which is transmitted via the field bus between the bus users; (c)analyzing the data packet with respect to its information content; (d)predicting a current operational state of the bus users in dependence onthe preceding state of the bus users and the information content of thedata packet; (e) recording the current operational states of the bususers; and (f) repeating steps (b) to (e) in order to detect the currentoperational states of the bus users in an in-line manner.
 2. Diagnosticprocedure according to claim 1, wherein the states of the bus users arerecorded in a state vector.
 3. Diagnostic procedure according to claim2, wherein the state vector is generated cyclically.
 4. Diagnosticprocedure according to claim 3, wherein the field bus system operatescyclically and a state vector is generated in each bus cycle. 5.Diagnostic procedure according to claim 3, wherein the cycle ofgeneration of the state vector is predetermined by a user.
 6. Diagnosticprocedure according to claim 2, wherein in step (c), the currentoperational state of the field bus is also derived and in step (d), thecurrent operational state of the field bus is recorded.
 7. Diagnosticprocedure according to claim 6, wherein the current operational state ofthe field bus is recorded in the state vector.
 8. Diagnostic procedureaccording to claim 1, wherein in step (e), the current states of the bususers are continuously detected.
 9. Diagnostic procedure according toclaim 1, wherein the bus users comprise field devices and at least onecontroller and in step (e), the current states of all field devices aredetected.
 10. Diagnostic procedure according to claim 1, wherein a datapacket is sent by a diagnostic device to at least one bus user andcurrent operational state of the at least one bus user is derived independence on a response data packet sent by the bus user. 11.Diagnostic procedure according to claim 1, wherein the currentoperational states of the bus users are displayed.
 12. Diagnosticprocedure according to claim 1, wherein the data packets are analyzedwith respect to input and/or output data of the bus users. 13.Diagnostic procedure according to claim 12, wherein the input and/oroutput data are displayed.
 14. Diagnostic procedure according to claim1, wherein the data packets are analyzed with respect to messagerepetitions, faulty data packets and/or state changes of the bus users.15. Diagnostic procedure according to claim 14, wherein the frequency ofthe message repetitions, of the faulty data packets and/or the statechanges is detected and statistically evaluated.
 16. Diagnostic facilityfor a field bus system in which bus users exchange data via a field busin accordance with a predetermined communication protocol, the databeing exchanged in the form of data packets, comprising: means forrecording operational states of the bus users; means for detecting datapackets which are transmitted via the field bus between the bus users;and means for analyzing the data packets with respect to theirinformation content and predicting the operational states of the bususers in dependence on the preceding states of the bus users and theinformation content of the data packets; wherein the means for recordingstates of the bus users are set up for recording operational states inan in-line manner.
 17. Diagnostic facility according to claim 16,wherein the means for recording states of the bus users have a memoryfor storing state vectors.
 18. Diagnostic facility according to claim16, wherein the means for recording states of the bus users, the meansfor detecting data packets and the means for analyzing the data packetsand deriving current operational states of the bus users are set up foroperating cyclically.
 19. Diagnostic facility according to claim 16,wherein the means for analyzing the data packets are set up for alsoderiving a current operational state of the field bus and the means forrecording states of the bus users are set up for also recording thecurrent operational state of the field bus.
 20. Diagnostic facilityaccording to claim 16, further comprising means for sending a datapacket to at least one field device which is a bus user, wherein themeans for analyzing the data packets are set up for deriving the currentoperational of the field device in dependence on a response data packetsent by the field device.
 21. Diagnostic facility according to claim 16,further comprising a display for displaying the updated states of thebus users.
 22. Diagnostic facility according to claim 16, wherein themeans for analyzing the data packets are set up for analyzing the datapackets with respect to input and/or output data of the bus users. 23.Diagnostic facility according to claim 16, wherein the means foranalyzing the data packets are set up for analyzing the data packetswith respect to message repetitions, faulty data packets and/or statechanges of the bus users.
 24. Diagnostic facility according to claim 23,further comprising means for detecting and statistically evaluating thefrequency of the message repetitions, the faulty data packets and/or thestate changes in order to detect a possible deterioration of the bus orof the bus users.
 25. Diagnostic facility according to claim 16, whereinit is implemented in an independent device unit which can be temporarilyconnected to the field bus for the purpose of analyzing the field bussystem.